Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
Difference between let eventEl = $("#" + rowId + "textarea"); and let eventEl = $("#" + rowId + " textarea");?

Basically, the code creates a "scheduler" of sorts using JS for an assignment. I spent hours troubleshooting why the code below wasn't correctly saving information to local storage. I was able to isolate the error to a specific function within my code.

Once I did that, then I went down each line of code and tried everything to see what would fix the error. Turns out, adding a space before textarea in let eventEl = $("#" + rowId + "textarea"); fixed it for some reason.

In other words, let eventEl = $("#" + rowId + " textarea"); works fine, but the previous one doesn't.

Can anyone help explain why?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A space is the descendant combinator in CSS. If you did not add the space, you would be looking for an element with the id of rowId concatenated with "textarea" rather than a textarea contained inside the element with id of rowId.

The descendant combinator — typically represented by a single space (" ") character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector. Selectors that utilize a descendant combinator are called descendant selectors.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!